package com.acertificate.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.commons.io.IOUtils;

public class SqlArchive {

	public static void main(String[] args) throws FileNotFoundException, IOException {
		File dirFile = new File("C:\\sql");
		File[] file = dirFile.listFiles();
		StringBuffer sb = new StringBuffer();
		for (File file2 : file) {
			sb.append(IOUtils.toString(new FileInputStream(file2)) + "\r\n");

		}
		IOUtils.write(sb.toString(), new FileOutputStream(new File("c:\\sql\\archive.sql")));
	}
}
